<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMrpChangeLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('mrp_change_log', function (Blueprint $table) {
            $table->integer('uid')->index('uid_index');
            $table->integer('change_type')->default(0); // 改变类型：0:增加；1:减少
            $table->integer('change_num');
            $table->integer('created_at')->index('mcl_ctime_index');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('mrp_change_log');
    }
}
